package com.cn.controller;

import com.cn.pojo.Adv;
import com.cn.pojo.OrdersDish;
import com.cn.response.Result;
import com.cn.service.OrdersDishService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 功能描述: <br>
 *
 * @program: wx-nimi-bank
 * @description: 购物车存放信息控制层
 * @author: Mr.TYJ
 * @create: 2022-06-17 14:15
 **/
@RestController
@CrossOrigin
@Slf4j
@Api(tags = "订单控制层")
@RequestMapping("/ordersDish")
public class OrdersDishController {
    @Autowired
    private OrdersDishService ordersDishService;

    @ApiOperation(value = "根据id查询轮播图参数")
    @PostMapping("/selectByOrderId")
    public Result selectByOrderId(@RequestParam(value = "orderId",required = true) Long orderId){
        OrdersDish ordersDish=ordersDishService.selectByOrderId(orderId);
        return Result.ok().data("ordersDish",ordersDish);
    }
}
